package com.example.schoolmanage.domain;


import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.example.schoolmanage.enums.SexEnum;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Length;
import org.hibernate.validator.constraints.NotBlank;

import java.io.Serializable;

/**
 *
 * @TableName STUDENT
 */
@TableName(value ="STUDENT")
@Data
public class StudentAdd implements Serializable {

    private static final long serialVersionUID = 1L;


    @ApiModelProperty("名字")
    @NotBlank(message = "名字不能为空")
    @TableField("STU_NAME")
    private String stuName;

    @ApiModelProperty(value = "性别", allowableValues = "F,M")
    @Length(max = 1, message = "性别参数只有一位，F或者M")//添加了枚举这个校验就不需要了
    @TableField("STU_SEX")
    private SexEnum stuSex;





}